package com.zut.hospital.controller.examination;

import com.zut.hospital.service.examination.PhySearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @PackageName:com.zut.hospital.controller.staff.examination
 * @Date:2019/5/24 12:12
 * @Author: zsy
 */
@Controller
@ResponseBody
public class PhySearchController {

    @Autowired
    PhySearchService phySearchService;

    @GetMapping("/allResult")
    public String findAllResult(@RequestParam("page") int page, @RequestParam("limit") int limit) {
        return phySearchService.pageResult(page, limit);
    }

    @GetMapping("/allDept")
    public String findALlDept() {
        return phySearchService.findAllDept();
    }

    @GetMapping("/nonProDept")
    public String findNonProDept(){
        return phySearchService.NonProDept();
    }

    @GetMapping("/phyDept")
    public String findPhyDept() {
        return phySearchService.countDept();
    }

    @GetMapping("/phyStu")
    public String findPhyStu() {
        return phySearchService.countStudent();
    }

    /**
     * @Description返回关联表中的所有学生信息并提示是否已经录入体检结果
     * @Param []
     * @Return java.lang.String
     * @Date 21:40 2019/6/6
     **/
    @GetMapping("/regStu")
    public String findRegStu() {
        return phySearchService.findAllRegStu();
    }
}